package com.neuedu.week3Test3;

public abstract class Shape {
    /**
     * 面积
     */
    private double area;
    /**
     * 周长
     */
    private double per;
    /**
     * 颜色
     */
    private String color;

    /**
     * 创建抽象方法
     */
    public abstract double getArea();

    public abstract double getPer();

    public abstract void showAll();

    /**
     * 空参构造
     */
    public Shape() {
    }

    /**
     * 全参构造
     */
    public Shape(String color) {
        this.color = color;
    }

    /**
     * get和set方法
     */
    public void setArea(double area) {
        this.area = area;
    }

    public void setPer(double per) {
        this.per = per;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }
}
